package com.pand.model.user;

import com.pand.model.BaseObject;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 
 * @ClassName: Privilege
 * @Description: 权限
 *
 */
@Entity
@Table(name = "SYS_PRIVILEGE")
public class Privilege extends BaseObject {
	/**
	 * @Fields serialVersionUID :
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	private String id;

	/**
	 * 菜单id
	 */
	private Long moduleId;

	/**
	 * 界面按钮名称
	 */
	private String privilegeName;

	/**
	 * 菜单功能描述
	 */
	private String privilegeDesc;

	@Id
	@Column(name = "ID")
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "MODULE_ID")
	public Long getModuleId() {
		return moduleId;
	}

	public void setModuleId(Long moduleId) {
		this.moduleId = moduleId;
	}

	@Column(name = "PRIVILEGE_NAME")
	public String getPrivilegeName() {
		return privilegeName;
	}

	public void setPrivilegeName(String privilegeName) {
		this.privilegeName = privilegeName;
	}

	@Column(name = "DESCRIBE")
	public String getPrivilegeDesc() {
		return privilegeDesc;
	}

	public void setPrivilegeDesc(String privilegeDesc) {
		this.privilegeDesc = privilegeDesc;
	}

	public boolean equals(Privilege other) {
		return this.id.equalsIgnoreCase(other.getId());
	}

}
